using System;
using System.Collections.Generic;
using System.Text;
using Microsoft.DirectX.Direct3D;

namespace SharpWind.Graphics
{
	public static class VertexDeclarations
	{
		public static VertexDeclaration PostProcessing
		{
			get
			{
				VertexElement[] elements = new VertexElement[]
				{
					new VertexElement(0, 0, DeclarationType.Float3, DeclarationMethod.Default, DeclarationUsage.Position, 0),
					new VertexElement(0, 12, DeclarationType.Float2, DeclarationMethod.Default, DeclarationUsage.TextureCoordinate, 0),
					VertexElement.VertexDeclarationEnd
				};
			
				return new VertexDeclaration( Engine.Instance.Graphics.Device, elements );
			}
		}

		public static VertexDeclaration TransformTexturing
		{
			get
			{
				VertexElement[] elements = new VertexElement[]
				{
					new VertexElement(0, 0, DeclarationType.Float3, DeclarationMethod.Default, DeclarationUsage.Position, 0),
					new VertexElement(0, 12, DeclarationType.Float3, DeclarationMethod.Default, DeclarationUsage.Normal, 0),
					new VertexElement(0, 24, DeclarationType.Float2, DeclarationMethod.Default, DeclarationUsage.TextureCoordinate, 0),
					VertexElement.VertexDeclarationEnd
				};

				return new VertexDeclaration( Engine.Instance.Graphics.Device, elements );
			}
		}

		public static VertexDeclaration NormalMapping
		{
			get
			{
				VertexElement[] elements = new VertexElement[]
				{
					new VertexElement( 0, 0, DeclarationType.Float3, DeclarationMethod.Default, DeclarationUsage.Position, 0 ),
					new VertexElement( 0, 12, DeclarationType.Float3, DeclarationMethod.Default, DeclarationUsage.Normal, 0 ),
					new VertexElement( 0, 24, DeclarationType.Float3, DeclarationMethod.Default, DeclarationUsage.TextureCoordinate, 0 ),
					new VertexElement( 0, 36, DeclarationType.Float3, DeclarationMethod.Default, DeclarationUsage.Tangent, 0 ),
					new VertexElement( 0, 48, DeclarationType.Float3, DeclarationMethod.Default, DeclarationUsage.BiNormal, 0 ),
					VertexElement.VertexDeclarationEnd
				};

				return new VertexDeclaration( Engine.Instance.Graphics.Device, elements );
			}
			
		}
	}
}
